<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class CitySite extends Model
{
    public $timestamps = false;

    protected $primaryKey = 'cityID';

    protected $table = 'city_site';

    protected $fillable = [
        'cityID',
        'photo',
        'pinyin', //前两个首字母
        'orderby', //排序
        'first_letter', //开头首字母
        'id',
        'photo_oss',
        'is_astrict', //活动限制开关
        'percent', //红包百分比
        'probability_up', //红包概率区间上限
        'probability_below', //红包概率区间下限
        'start_time', //开始时间
        'end_time', //结束时间
        'subsidy_sum', //补贴总金额,0表示无限制,
        'subsidy_money', //已发放总金额
        'received_money', //已领取总金额
        'subsidy_proportion', //补贴金额基础比例
        'subsidy_probability_below', //补贴比例下限
        'subsidy_probability_up', //补贴比例上限
        'subsidy_start_time', //补贴开始时间
        'subsidy_end_time', //补贴结束时间
        'is_subsidy_astrict', //1关，2开
    ];

    public function city()
    {
        return $this->hasOne('App\\Models\\City', 'cityID', 'cityID');
    }
}
